@*****************************************************************
@				SRLOS TEAM ALL RIGHT RESERVED
@filename	head.s
@author		bloceanc
@date		08/09/2010
@note		this file is system kernel assember head file
@ 						##WARNING##
@		if you modify this file, please check whether need to 
@	modify the address of 'B' instruction in the interrupt table of
@	bootloader file! 
@*****************************************************************

.section .text
.global _start
.extern head_main

.extern g_interrupt_und
.extern g_interrupt_svc
.extern g_interrupt_instr_abt
.extern g_interrupt_data_abt
.extern g_interrupt_irq
.extern g_interrupt_fiq

_start:
	@as all has been defined, and stack has been initialized when bootload
	@we just jump to kernel main function.
	@we add this file for externed using
	
	b head_main		@ call head_main, this instruction is 4Byte length. we will
					@ need this lenght following to find the address of interrupt handler.
@----------------------------------------------------------------------------
@								##WARNNING##
@	following is head of interrupt process.
@	here we can't use BL, becuase we can't modify the value of LR_mod(R14_mod)
@ return address of interrupt saved here now, so we must not modify it, we 
@ must not use BL or anyother instructions that will modify the value of LR_.
@----------------------------------------------------------------------------

@absourlotion address of undefine interrupt handle is 0x105000 + 4 = 0x105004
	b g_interrupt_und
@absourlotion address of SWI ...  .... .. ..   ..  .. 0x105000 + 8 = 0x105008
	b g_interrupt_svc
@absourlotion address of prefetch .... .. ..   ..  .. 0x105000 + 12 = 0x10500c
	b g_interrupt_instr_abt
@absourlotion address of abort .. .... .. ..   ..  .. 0x105000 + 16 = 0x105010
	b g_interrupt_data_abt
@absourlotion address of reserved .. .... .. ..   ..  0x105000 + 20 = 0x105014
	b _start
@absourlotion address of irq ... .... .. ..   ...  .. 0x105000 + 24 = 0x105018
	b g_interrupt_irq
@absourlotion address of fiq ... .... .. ..   ...  .. 0x105000 + 28 = 0x10501c
	b g_interrupt_fiq
